package com.zhangheng.arktspage.dialog

import com.intellij.ide.util.PropertiesComponent
import com.intellij.openapi.project.Project

class PreferencesUtil {

    private var applicationComponent: PropertiesComponent = PropertiesComponent.getInstance()
    val pageName = "pageName"
    val developName = "developName"


    fun setValue(keyName: String, key: String) {
        applicationComponent.setValue(keyName, key)
    }

    fun getValue(key: String): String? {
        return applicationComponent.getValue(key)
    }

    fun getValue(project: Project, key: String): String? {
        val projectComponent = PropertiesComponent.getInstance(project)
        return projectComponent.getValue(key)
    }

}